package com.tju.resource.oauth.controller.tb;

import com.tju.resource.annotation.Log;
import com.tju.resource.business.tb_pur_store.TbPurStoreService;
import com.tju.resource.result.Result;
import com.tju.resource.tool.enum_utils.FunctionType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 耗材入库记录
 */
@RestController
public class TbPurStoreController {
    private final static String prefix = "pur/store/";
    @Autowired
    private TbPurStoreService tbPurStoreService;

    /**
     * 查询耗材入库记录
     *
     * @param params
     * @return
     */
    @PostMapping(prefix + "list")
    @PreAuthorize("hasAuthority('sys:record:purStore:list')")
    @Log(type = FunctionType.List)
    public Result<Object> selectTbPurStore(@RequestBody Map<String, String> params) {
        return tbPurStoreService.selectTbPurStore(params);
    }
}
